import request from "../utils/request";
export default {
    getAllDepartmentList(){
        return request.get("/department",{
            method:"get"
        })
    },
    getSpecieDepartmentList(deptName,status){ 
        const params = {
            deptName,
            status
        };
        return request.get("/department/getSpecieDepartment",{params},{
            method:"get",
        })
    },
    getDepartmentSelect(){
        return request.get("/department/getDepartmentSelect",{
            method:"get",
        })
    },
    addDepartment(departmentAdd){
        return request.post("/department",departmentAdd,{
            method:"post",
        })
    },
    getDepartmentById(id){
        const params = {
            id
        };
        return request.get("/department/getDepartmentById",{params},{
            method:"get",
        })
    },
    updateDepartmentById(departmentAdd){
        return request.put("/department",departmentAdd,{
            method:"put",
        })
    },
    deleteDepartmentById(id){
        const params = {
            id
        };
        return request.delete("/department",{params},{
            method:"delete",
        })
    }
}